<footer class="footer"> 
<?
	require_once "facebook/facebook.php";

	if(true == empty($fbUserID)) {

	$fb = new Facebook(array(
		"appId"=>"115502678537142",
		"secret"=>"24b002eb0b0b09332bbf635972988504",
		"cookie"=>true
	));

$loginUrl = $fb->getLoginUrl(array(
"scope" => "email", //글쓰기 가능
"display" => "touch", //모바일용 웹페이지
"redirect_url" => "http://gilstar.com" . $_SERVER["REQUEST_URI"] //로그인 후 돌아올 페이지
));
$fbUserID = $fb->getUser();


}

if($fbUserID) {
$userInfo = $fb->api("/me");
$logoutUrl = $fb->getLogoutUrl(array("next"=>"http://gilstar.com/" ));
	echo "<a href=\"{$logoutUrl}\" class=\"footerA\">{$userInfo["username"]} 로그아웃</a>";
}
else {
	echo "<a href=\"{$loginUrl}\" class=\"footerA\">Facebook 아이디로 로그인</a>";
}

?>

        <span class="footerDiv">|</span> <a href="#header" class="footerA">맨 위로</a> 
	<address class="footerCopy">Copyright by 길거리스타</address> 
</footer> 

</body> 
</html>


